<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>map</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <script src="https://cdn.bootcss.com/echarts/4.4.0-rc.1/echarts-en.min.js"></script>
    <script src="/js/china.js"></script>
    <script src="/js/draw.js"></script>
    <script src="https://cdn.bootcss.com/jquery/2.2.0/jquery.js"></script>
</head>
<body>
<?php
include "head.php";
?>
<h1 style="text-align: center">死亡</h1>
<h2>湖北：<span id="hubei"></span></h2>

<div id="main">

</div>
<script type="text/javascript">
  $(function() {
    $.get('<?php echo $datapath; ?>', function(rs) {
      // console.log(data);
      var dataList = [];
      var hubei = {
        "provinceName": "湖北",
        "confirmedCount": 0,
        "suspectedCount": 0,
        "curedCount": 0,
        "deadCount": 0,
        "comment": "",
      };
      for (i in rs['data']['area']) {
        if (rs['data']['area'][i]['provinceName'] == undefined
        ) {
          continue;
        }
        if (rs['data']['area'][i]['provinceName'] == '湖北') {
          hubei = rs['data']['area'][i];
          continue;
        }
        var provinceName = rs['data']['area'][i]['provinceName'];
        var apr = ( rs['data']['area'][i]['deadCount']);
        // console.log({name: provinceName, value: apr});

        dataList.push({name: provinceName, value: apr});
      }
      $('#hubei').html(hubei['deadCount'])

      draw("",dataList);
    });
  });




</script>
</body>
</html>